/**
 * 赋值运算符
 */

void main() {
  //1、基础赋值运算符 = 、??= 
  int a = 10;
  int b = 3;
  print(a);
  
  int c = a + b;
  print(c);

  //b??=23; 表示如果b为空的话把 23赋值给b
  int aa = 23;
  aa ??= 50;
  print(aa);

  int bb;
  bb ??= 12;
  print(bb);

  //2、复合赋值运算符   +=  -=  *=   /=   %=  ~/=
  var i = 12;
  i += 10; // 表示：i = a + 10;
  print(i);

  var j = 12;
  j ~/= 5; // 表示：j = j ~/ 5 取整
  print('j=$j');


}